From: Florian Müllner Date: Sun, 7 Aug 2022 00:10:22 +0000 (+0200) Subject: status/network: Keep sensitive when locked X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~39 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dc09f990c4a007bd2ce90ec1f6cdc3cc6452e4cf;p=gnome-shell.git status/network: Keep sensitive when locked Unlike the old menu that restricted almost everything on the lock screen, we went into the completely opposite direction with quick settings and kept everything that does not launch windows available. Extend that line to the network items, but still respect the `network-control` permission. Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 14df7978b..5a351789e 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1890,20 +1890,16 @@ class Indicator extends PanelMenu.SystemIndicator { try { this._configPermission = await Polkit.Permission.new( 'org.freedesktop.NetworkManager.network-control', null, null); + + this._allSections.forEach(section => { + this._configPermission.bind_property('allowed', + section, 'reactive', + GObject.BindingFlags.SYNC_CREATE); + }); } catch (e) { log(`No permission to control network connections: ${e}`); this._configPermission = null; } - - Main.sessionMode.connect('updated', this._sessionUpdated.bind(this)); - this._sessionUpdated(); - } - - _sessionUpdated() { - const sensitive = - !Main.sessionMode.isLocked && - this._configPermission && this._configPermission.allowed; - this.menu.setSensitive(sensitive); } _onActivationFailed() {